var arr = [' 1234 ', '123', '123 '];
function map() {
    var result = [];
    for (var i = 0; i < arr.length; i++) {
        result.push(arr[i].trim());
    }
    return result;
}
Array.prototype.map = function (fn) {
    var resultArr = [];
    for (var _i = 0, _a = this; _i < _a.length; _i++) {
        var val = _a[_i];
        resultArr.push(fn(val));
    }
    return resultArr;
};
